<template>
	<view class="bg-white flex align-stretch" hover-class="bg-light" @click="$emit('click')">
		<view class="flex align-center justify-center py-2 px-3">
			<slot name="icon"></slot>
			<image v-if="cover" :src="cover" mode="widthFix" style="width: 75rpx; height: 75rpx;"></image>
		</view>
		<view class="flex-1 flex align-center justify-between pr-3" :class="isBorderBottom ? 'border-bottom' : ' '">
			<text class="font-md text-dark">{{title}}</text>
			<view class="flex align-center" v-if="showRight">
				<slot name="right"></slot>
				<text class="iconfont text-light-muted font-md">&#xe60c;</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"liweijian-list-item",
		props: {
			// 封面
			cover: {
				type: String,
				default: ""
			},
			// 标题
			title: {
				type: String,
				default: ""
			},
			// 右侧箭头是否显示
			showRight: {
				type: Boolean,
				default: false
			},
			// 是否需要下边框线
			isBorderBottom: {
				type: Boolean,
				default: true
			},
		},
		data() {
			return {
			};
		}
	}
</script>